package com.ruoyi.customer.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.market.domain.ConfigBase;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 客户卡券对象 coupon
 * 
 * @author ruoyi
 */
public class CustomerCoupon extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 客户卡券ID */
    private Long couponId;

    /** 客户ID */
    private Long customerId;

    /** 商品ID */
    private Long goodsId;

    /** 店铺ID */
    private String shopId;

    /** 客户卡券状态（0待使用 1已使用 2已过期） */
    private String status;

    /** 上架状态（0正常 1停用） */
    private String active;

    /** 客户卡券标题 */
    private String couponTitle;

    /** 客户卡券金额 */
    @Excel(name = "客户卡券金额")
    private BigDecimal couponPrice;

    /** 客户卡券金额-使用门槛 */
    @Excel(name = "客户卡券金额-使用门槛")
    private BigDecimal couponPriceThreshold;

    /** 使用时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date useTime;

    /** 有效时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date expireTime;

    private CustomerUser customerUser;

    /** 所属店铺信息   */
    private ConfigBase shopInfo;

    public CustomerCoupon()
    {

    }

    public CustomerCoupon(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getCouponId()
    {
        return couponId;
    }

    public void setCouponId(Long couponId)
    {
        this.couponId = couponId;
    }

    public Long getGoodsId()
    {
        return goodsId;
    }

    public void setGoodsId(Long goodsId)
    {
        this.goodsId = goodsId;
    }

    public String getShopId()
    {
        return shopId;
    }

    public void setShopId(String shopId)
    {
        this.shopId = shopId;
    }

    public Long getCustomerId()
    {
        return customerId;
    }

    public void setCustomerId(Long customerId)
    {
        this.customerId = customerId;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getActive()
    {
        return active;
    }

    public void setActive(String active)
    {
        this.active = active;
    }

    public BigDecimal getCouponPrice(){ return couponPrice;}

    public void setCouponPrice(BigDecimal couponPrice){ this.couponPrice = couponPrice; }

    public BigDecimal getCouponPriceThreshold(){ return couponPriceThreshold;}

    public void setCouponPriceThreshold(BigDecimal couponPriceThreshold){ this.couponPriceThreshold = couponPriceThreshold; }

    public String getCouponTitle(){ return couponTitle;}

    public void setCouponTitle(String couponTitle){ this.couponTitle = couponTitle; }

    public Date getUseTime(){ return useTime;}

    public void setUseTime(Date useTime){ this.useTime = useTime; }

    public Date getExpireTime(){ return expireTime;}

    public void setExpireTime(Date expireTime){ this.expireTime = expireTime; }

    public CustomerUser getCustomerUser()
    {
        return customerUser;
    }

    public void setCustomerUser(CustomerUser customerUser)
    {
        this.customerUser = customerUser;
    }

    public ConfigBase getShopInfo()
    {
        return shopInfo;
    }

    public void setShopInfo(ConfigBase shopInfo)
    {
        this.shopInfo = shopInfo;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("couponId", getCouponId())
            .append("goodsId", getGoodsId())
            .append("shopId", getShopId())
            .append("customerId", getCustomerId())
            .append("couponTitle", getCouponTitle())
            .append("couponPrice", getCouponPrice())
            .append("couponPriceThreshold", getCouponPriceThreshold())
            .append("active", getActive())
            .append("useTime", getUseTime())
            .append("expireTime", getExpireTime())
            .append("status", getStatus())
            .append("customerUser", getCustomerUser())
            .append("shopInfo", getShopInfo())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
